Error Correction Coding (ECC) is used in various applications, such as in communication systems and data storage systems. The ECC is sometimes used for parameter estimation. For example, U.S. Pat. No. 8,156,398, whose disclosure is incorporated herein by reference, describes a method for operating a memory that includes analog memory cells. the method includes encoding data with an Error Correction Code (ECC) that is representable by a plurality of equations. The encoded data is stored in a group of the analog memory cells by writing respective input storage values to the memory cells in the group. Multiple sets of output storage values are read from the memory cells in the group using one or more different, respective read parameters for each set. Numbers of the equations, which are satisfied by the respective sets of the output storage values, are determined. A preferred setting of the read parameters is identified responsively to the respective numbers of the satisfied equations. The memory is operated on using the preferred setting of the read parameters.